package com.example.agrigreennewssys.controller;


import com.example.agrigreennewssys.service.DashboardService;
import com.example.agrigreennewssys.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 光的代言人
 */
@RestController
@RequestMapping("/api")
public class DashboardController {
    @Autowired
    private DashboardService dashboardService;
    @RequestMapping("/dashboard")
    public Result getDashboardData(){
        return Result.success(dashboardService.getDashboardData());
    }
}
